﻿<div data-toggle="tooltip" title="{{rowCtrl.response.ErrorMessage}}" ng-click ="rowCtrl.rowClicked();" class="grayDiv" ng-class="{greenDiv: rowCtrl.response.Imported, blueDiv: rowCtrl.response.ImportedWithNewID, yellowDiv: rowCtrl.response.Conflict, redDiv: rowCtrl.response.Error}"><div class="appControllerDivISBN"> {{rowCtrl.data[0].ISBN}} </div> <div class="appControllerDivTitle">{{rowCtrl.data[0].Title}}</div> <div class="appControllerDivAuthors">{{rowCtrl.data[0].Authors}}</div> <div class="appControllerDivDoeID">{{rowCtrl.response.DoeLibS_ID}}</div></div>
<div ng-show="rowCtrl.show" class="appControllerTableDiv" ng-if="rowCtrl.response.APICallError">
    <table class="appControllerTable">
        <tbody>
            <tr>
                <td>
                    <input type="button" class="importSuggestionBtn" value="try again" ng-click="rowCtrl.tryAgain(rowCtrl.data[0]);" /></td>
            </tr>
        </tbody>
    </table>
</div>
<div ng-show="rowCtrl.show" class="appControllerTableDiv" ng-if="!rowCtrl.response.APICallError">
    <table class="appControllerTable">
        <thead><tr><th style="width:15%"></th><th style="width:42.5%">Your Data</th><th style="width:42.5%">Our Suggestion</th></tr></thead>
        <tr><td>ISBN</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].ISBN" /> </td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.ISBNS" /> </td></tr>
        <tr><td>Title</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Title" /> </td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Title.BookTitle" /> </td></tr>
        <tr><td>Authors</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Authors" /> </td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Authors" /> </td></tr>
        <tr><td>First edition year</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0]['First edition year']" /> </td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Title.FirstEditionYear" /> </td></tr>
        <tr><td>Edition</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Edition" /> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Title.EditionNumber" />   </td></tr>
        <tr><td>Publication year</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0]['Publication year']" /> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Title.EditionYear" /> </td></tr>
        <tr><td>Publisher</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Publisher" /> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Title.Publisher.Name" />  </td></tr>
        <tr><td>Topics</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Topics" /> </td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Topics" /> </td></tr>
        <tr><td>Location category</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0]['Location category']" /> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Category.Name" /> </td></tr>
        <tr><td>Room</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0].Room" /> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Location" /></td></tr>
        <tr><td>DoeLibS-identifier</td> <td> <input class="appControllerTxtBox" type="text" ng-model="rowCtrl.data[0]['Doelibs Identifier']" readonly="readonly" disabled/> </td> <td><input class="appControllerTxtBox" type="text" ng-model="rowCtrl.response.Suggestion.Loanable.Barcode" readonly="readonly" disabled /></td></tr>
        <tr><td></td> <td><input type="button" value="add with my data" class="importSuggestionBtn" ng-click="rowCtrl.addLoanable(rowCtrl.data[0]);" /></td> <td><input type="button" class="importSuggestionBtn" ng-click="rowCtrl.addLoanable(rowCtrl.response);" value="add with our suggestion" /></td> </tr>
    </table>
</div>
